Repository navigation
Run the emulated tests on the cross packages' libraries - #47
Merged
Merged
Conversation
ubuntu-latest moved to ubuntu-26.04, which installs Ubuntu's amd64v3 packages. Their glibc assumes AVX2, and the x86_64 emulated jobs ran the test binaries on the runner's own glibc, so under `-cpu Nehalem` and `-cpu Denverton` they died of SIGILL before a test started. Each emulated job now installs its target's *-cross libc and libgcc, which are built for the baseline of their architecture, and points QEMU at them with `-L`. `-L` alone is not enough: QEMU only serves a path from the prefix when it exists there and quietly falls back to the host's otherwise, and the guest's loader reads the host's ld.so.cache, which names /usr/lib/<triple>/libc.so.6. So `-E LD_LIBRARY_PATH=/lib` makes the loader look in /lib first, which `-L` maps into the sysroot. This also fixes the i686 and i586 jobs, whose `-L /usr/i686-linux-gnu` pointed at a directory nothing installed, so they had been on the host's multilib libc all along. A new step runs the sysroot's loader with `--list` on a test binary, through the same QEMU flags as the tests, and fails if any library resolves outside the sysroot, so a fallback to the host cannot go unnoticed again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ubuntu-latest moved to ubuntu-26.04, which installs Ubuntu's amd64v3 packages. Their glibc assumes AVX2, and the x86_64 emulated jobs ran the test binaries on the runner's own glibc, so under
-cpu Nehalemand-cpu Denvertonthey died of SIGILL before a test started.Each emulated job now installs its target's *-cross libc and libgcc, which are built for the baseline of their architecture, and points QEMU at them with
-L.-Lalone is not enough: QEMU only serves a path from the prefix when it exists there and quietly falls back to the host's otherwise, and the guest's loader reads the host's ld.so.cache, which names /usr/lib//libc.so.6. So-E LD_LIBRARY_PATH=/libmakes the loader look in /lib first, which-Lmaps into the sysroot. This also fixes the i686 and i586 jobs, whose-L /usr/i686-linux-gnupointed at a directory nothing installed, so they had been on the host's multilib libc all along.A new step runs the sysroot's loader with
--liston a test binary, through the same QEMU flags as the tests, and fails if any library resolves outside the sysroot, so a fallback to the host cannot go unnoticed again.